export class LocalStorage<T> {
  getLocal(): T[] {
    const cacheStr = localStorage.getItem('todo_cache')
    return cacheStr ? JSON.parse(cacheStr) : []
  }

  setLocal(todos: T[]) {
    localStorage.setItem('todo_cache', JSON.stringify(todos))
  }
}